package main

import (
	"fmt"
)

func getSeqence() func() int {
	i := 0
	return func() int {
		i++
		return i
	}
}

func main() {
	nextNum := getSeqence()
	fmt.Println(nextNum())
	fmt.Println(nextNum())
	fmt.Println(nextNum())

	nextNum = getSeqence()
	fmt.Println(nextNum())
	fmt.Println(nextNum())
}
